package com.webchat.ugc.repository.entity.mall;

import com.webchat.ugc.repository.entity.BaseEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;


/**
 * 订单（商品订单、抽奖订单……）取消记录表
 */
@Data
@Entity
@Table(name = "web_chat_mall_cancel_order")
public class MallCancelOrderEntity extends BaseEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    protected Long id;

    /**
     * 订单业务ID（需要保证分布式下唯一）
     */
    @Column(name = "order_no")
    protected String orderNo;

    @Column(name = "cancel_reason")
    private String cancelReason;

    /**
     * 最终取消的金额
     */
    @Column(name = "cancel_amount")
    private BigDecimal cancelAmount;

    @Column(name = "status")
    private Integer status;

    /**
     * 完成时间
     */
    @Column(name = "finished_date")
    private Date finishedDate;
}
